<extend name="Public/Common/base.html" />
<block name="main">
<css href="__PUBLIC__/assets/css/tp.css" />
<js href="__PUBLIC__/assets/js/jquery.min.js" /> 
 <js href="__PUBLIC__/layer/layer.js" />
 <js href="__PUBLIC__/assets/js/app.js" />
<style>
.am-table{
	font-size:13px;
}
</style>

<form class="am-form">
		<div class="am-form-group am-u-sm-12">
			<label for="doc-select-1">选择月份:</label> <select id="getid"
				name="getid" required onchange="selectlate()">
				<option value="{$month}" selected>{$month}月</option>
				<volist name="monthlist" id="vo">
				<option value="{$vo.id}">{$vo.month}月</option>
				</volist>
			</select> <span class="am-form-caret"></span> <input id="tex" type="hidden"
				name="tex" value="">
		</div>
	</form>

<table class="am-table am-table-compact am-table-centered am-scrollable-horizontal   am-table-bordered">
    <thead>
     <tr>
           <th  colspan="5">
			{$year}年{$month}月
			</th>
			<th  colspan="1">
			 <button class="am-btn am-btn-danger am-btn-xs" onclick="cdgl()">批量删除</button>
			</th>
           
        </tr>
        <tr>
            <th><input type="checkbox" id="selectall" value=""></th>
            <th>id</th>
            <th>姓名</th>
            <th>迟到月份</th>
            <th>迟到次数</th>         
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    
    <if condition="$latelist EQ $null">
	   <tr >
	    <td colspan="6">
		<span style="color:red;">暂无迟到记录</span>	
		<td>
	   </tr> 	
    <else/>    
    <volist name="latelist" id="vo">
   
        <tr>
            <td><input type="checkbox" name="select[]" class="cq" value="{$vo.id}">
            <td>{$i}</td>
            <td>{$vo.latename}</td>
            <td>{$vo.latemid}</td>                
            <td>{$vo.latetime}</td>                   
            <td>
            <a href="{:U('late/edit?id='.$vo['id'])}">
            <button class="am-btn am-btn-primary am-btn-xs ">编辑</button>
            </a>                  
            </td>
        </tr>
       
       </volist>
       </if>
    </tbody>
</table>
		  <div class="am-g am-text-center">
		      {$page}
			</div> 
	<div class="am-g">
       <a href="{:U('Late/add')}">
           <button class="am-btn am-btn-primary am-btn-sm ">{$info}</button>
        </a>
	</div>
  <js href="__PUBLIC__/assets/js/jquery14.js" /> 
<script type="text/javascript"> 
$(function(){ 
$("#selectall").click(function() { 
 var flag = $(this).attr("checked"); 					
  $("[name=select[]]:checkbox").each(function(){
	  $(this).attr("checked", flag);
	  });
});	 
});	

</script>    
     
</block>
